<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>

	<body>
		<div id="app">
			<cpn></cpn>
			<cpn></cpn>
			<cpn></cpn>
		</div>
		<!-- 1.script标签分离写法，类型必须是type="text/x-template" -->
		<script type="text/x-template" id="cpn">
			<div>
			  <h2>我是标题</h2>
			  <p>我是内容,哈只整合</p>
			</div>
		</script>
		<!-- 2.template模板标签分离写法 -->
		<template id="cpn1">
			<div>
				<h2>我是标题</h2>
				<p>我是内容,果的人</p>
			</div>
		</template>

		<script src="../lib/vue.js"></script>
		<script>
			Vue.component("cpn", {
				template: "#cpn1"
			});
			let vm = new Vue({
				el: "#app",
				data: { message: "hello" },
				methods: {}
			});
		</script>
	</body>
</html>
